﻿using System.Management.Automation;
using System;
using Sitecore.Security.Accounts;

namespace Cognifide.PowerShell.Shell.Commands
{
    [Cmdlet("Get", "UserAgent")]
    public class GetUserAgentCommand : PSCmdlet
    {

        protected override void ProcessRecord()
        {

            if (System.Web.HttpContext.Current != null)
            {
                WriteObject(System.Web.HttpContext.Current.Request.UserAgent, false);
            }
        }

    }
}